/**
 * 注册组件的
 */
export function createRegisterConfig() {
  let componentList = []
  let componentMap = {}
  return {
    componentList,
    componentMap,
    register: (component) => {
      componentList.push(component)
      componentMap[component.key] = component
    }
  }
}

export function editorBlockInputProp(label) {
  return { type: 'input', label }
}

export function editorBlockColorProp(label) {
  return { type: 'color', label }
}

export function editorBlockSelectProp(label, options) {
  return { type: 'select', label, options }
}